﻿using System;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Media;

namespace Icinetic.FeedCategorySample.Common.Converters
{
    public class StackPanelColorConverter : IValueConverter
    {
        public StackPanelColorConverter() { }

        public object Convert(object value, Type targetType, object parameter, string language)
        {
            if ((bool)value)
                return (App.Current.Resources["RssItemReadedColor"] as SolidColorBrush).Color.ToString();
            else
                return (App.Current.Resources["ApplicationColor"] as SolidColorBrush).Color.ToString();
        }

        public object ConvertBack(object value, Type targetType, object parameter, string language)
        {
            throw new NotImplementedException();
        }
    }
}
